#ifndef  SINGLESHUNT_H
#define  SINGLESHUNT_H

#include "windmill.h"
#include "Foc.h"





#define		TSAMP_MIN							96//96 4us time
#define		TSAMP_MINALL					123//120//96 4us time
#define		TSAMP_MINDOU					192	//192





 
typedef struct
{
	s16  ShiftMinVal;
	s16  Aphasebase;
	s16  Bphasebase;
	s16  Cphasebase;
	s16  Aphaseupval;
	s16  Bphaseupval;
	s16  Cphaseupval;
	s16  Aphasednval;
	s16  Bphasednval;
	s16  Cphasednval;
	s16  AdnPWMCmpdat;
	s16  BdnPWMCmpdat; 
	s16  CdnPWMCmpdat; 
	s16  TG0PWMCmpdat;
	s16  TG1PWMCmpdat; 
	u8   SampleChanel; 
}SingleShunt_Lib;
extern volatile SingleShunt_Lib SingleShuntPwmval;




void CMPGTriggerCntInitFun(void);
void GetShunt1PhaseCurrentFun(void);
void SingleShuntParameterInit(void);
void SingleShuntSampShiftFun(void);


#endif


